#!/usr/bin/env bash
# 本地安装bingo脚本，用于本地开发调试bingo

set -e
pip3 config set global.break-system-packages true
python3 build.py
echo "------------Build bingo successfully--------------"

pip3 uninstall -y openubmc-bingo
dpkg -P openubmc-bingo
echo "-----------Uninstall bingo successfully------------"

find output/PyPI -type f -name "*.whl" | xargs pip3 install
deb_pkg=$(find output/Generic -type f -name "*.deb")
dpkg -i $deb_pkg
echo "------------Install bingo successfully------------"
